package com.string.test;

import java.util.Scanner;

public class PhoneNumber {
    public static void main(String[] args) {
        String num;
        while (true){
            System.out.println("请输入您的电话号码:");
            Scanner sc=new Scanner(System.in);
            num= sc.next();
            if (num.length()==11)
                break;
            else System.out.println("输入错误，请重新输入！");//13373746566
        }
        String num1="****";
        System.out.println("这是您的电话号码："+num.substring(0,3)+num1+num.substring(7));
        System.out.println(num);

    }
}
